﻿<Window x:Class="UserControlDemo.MainWindow3"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:UserControlDemo="clr-namespace:UserControlDemo"
        xmlns:oxy="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf" Title="Plot in DataTemplate" Height="480" Width="640">
    <Window.Resources>
        <DataTemplate DataType="{x:Type UserControlDemo:ViewModel}">
            <oxy:PlotView Title="{Binding Title}">
                <oxy:PlotView.Series>
                    <oxy:LineSeries ItemsSource="{Binding Points}"/>
                </oxy:PlotView.Series>
            </oxy:PlotView>
        </DataTemplate>
    </Window.Resources>
    <TabControl ItemsSource="{Binding Models}" DisplayMemberPath="Title"/>
</Window>
